set(client_sec_storage_src src/client_sec_storage.c)

add_library(client_sec_storage_obj OBJECT ${client_sec_storage_src})
target_include_directories(client_sec_storage_obj PUBLIC inc)
target_include_directories(client_sec_storage_obj PRIVATE ${SE_BASE_SERVICES_DEFAULT_INC})
target_compile_options(client_sec_storage_obj PRIVATE ${SE_BASE_SERVICES_DEFAULT_CC})
target_link_libraries(client_sec_storage_obj PRIVATE client_base_obj)
target_link_libraries(client_sec_storage_obj PRIVATE se_base_services_defines)
target_link_libraries(client_sec_storage_obj PRIVATE logger_obj)
target_link_libraries(client_sec_storage_obj PRIVATE se_modules_sec_storage_ipc_proxy_obj)
if(OPTION_SECUREC_INDEPENDENT)
    message(STATUS "client_sec_storage_obj use independent secure c.")
    target_link_libraries(client_sec_storage_obj PRIVATE securec_interface)
endif()

add_library(client_sec_storage_so SHARED)
target_link_options(
    client_sec_storage_so
    PRIVATE
    ${SHARED_LINKER_FLAGS}
)

target_link_libraries(client_sec_storage_so PUBLIC client_base_obj)
target_link_libraries(client_sec_storage_so PUBLIC logger_obj)
target_link_libraries(client_sec_storage_so PUBLIC parcel_obj)
target_link_libraries(client_sec_storage_so PUBLIC client_sec_storage_obj)
target_link_libraries(client_sec_storage_so PUBLIC se_base_services_defines)
target_link_libraries(client_sec_storage_so PUBLIC se_modules_sec_storage_ipc_proxy_obj)

set_target_properties(client_sec_storage_so PROPERTIES OUTPUT_NAME "combine")

file(COPY inc/client_sec_storage.h DESTINATION "${CMAKE_SOURCE_DIR}/output/")
hw_sign_ta(client_sec_storage client_sec_storage.so.sec)
